import Vue from 'vue';
import Router from 'vue-router';
import { constantRouterMap } from './router.config.js';

Vue.use(Router);

const createRouter = () =>
	new Router({
		mode: 'history', // 如果你是 history模式 需要配置vue.config.js publicPath
		// base: '/volunteermobile/',
		base: './',
		scrollBehavior: () => ({ y: 0 }),
		routes: constantRouterMap
	});

const router = createRouter();

export default router;
